slight refactoring and added home button