added a definition for reverse