reverse a string with multiple methods