add plotting script
clean up a bit