adds reverse() method