reworking teh display function