converted factory to object var format