added reverse string function