cleanup
move plotting code elsewhere
code for making simple plots