creating the display function