dependency injection and child.prototype.child