Working on the display data funtion not working page froze