implemented reverse string with recursion