updated controller structure