refactored code appearance