fixed bugs and added reset buttons to add/view page