factory should be internal