change for the display and fixed some bugs