write the display method in View