creating factories and abstract devices