 
             let bean = BeanDeclaration()
 
-            bean.scope = BeanFactoryScope(declaration : declaration, context: self)
+            bean.scope = BeanFactoryScope(declaration : declaration, environment: self)
             bean.requires(bean: declaration)
             bean.clazz = target
 

        }

        func get(bean : Environment.BeanDeclaration, factory : BeanFactory) throws -> AnyObject {
            if let factoryBean = try declaration.getInstance(context) as? FactoryBean {
                return try factoryBean.create()
            }

            fatalError("cannot happen")

        // MARK: instance data

        let declaration : Environment.BeanDeclaration
        let environment: Environment

        // init

        init(declaration : Environment.BeanDeclaration, environment: Environment) {
            self.declaration = declaration
            self.environment = environment
        }

        // BeanScope
