refactor display