Changed Factory, now working with reflection