add inject_scope method