Updated controller class