A NEW COMPLEXITY FUNCTION FOR WORDS BASED ON PERIODICITY