updated plotting code
deleted runmaintfp