Added plotting functionality