attempt to refactor display