now using a controller class