formatted code and added a new view