Adding a bd function for going back