use inject instead of resource