refactoring + display improvements