add dependencies in argument function and remove controller to class function