modified the controller impl