refactor instantiation to use factory methods