create reverse string implementation