phase1: prepareFactory: use variables instead of list index