refactor around factory methods