adding plot script and other changes