fix reverse method