refactoring factory methods a bit