First implementation of controller class