updated controller class