editing hyrid script for plotting