successfully implemented reverses.c