creating display function