updated controller file