updated controller/view logic