finished first implementation of python gm.factorSubset()