made toggle event for going back