Factory Design Pattern - An effective approach