finished analysis function
added plots method
resolved merge conflict