added plotting capabilities