updated two cpp files: reverse reverseconst