added plotting capability