use inject method