pre-changes to display function