updating the controller method for clientController