add switch back functionality