separated files and created a back button