refined plotscript