Adds reverse method.
fixing merge conflict