converted pkfit to class format in the hope of speeding up repeated runs