Factory method refactorized