added lots of plotting