reverse words solution and test