revised changes to my code.