changes it to use a .each_char loop instead of a while loop