revised controller class