Implement method to reverse string