modified virtually everything to make runGeneric work in the new surroundings