changed the way arguments are passed in the reverse()