added register controller method