added STRING FUNCTION that follows a pattern