Factory Design pattern implemented