refactoring the factory :)
refactoring the factory :)