refactoring and stylization