more intermingling of codes
more params needed by 5.0 code (addresses #2)