modified consequence extract script py