copy over of ptjkarma script