Homework 3 - string reversing