added some asserts for string reverse