implemented back buttons