moved MyFactory to a separate class