wrote a function to alphabetize a sting input