Making the controller work