move main functions to display files