added a different way of reversing