changed controller structure