modified display.c