adding the show view and fixing some bugs