dependency inject class method