refactor education display function