updated plotting script