alternate ways - learning inject method