code cleanup
added reverse