refactoring and styling, devise