minor modifications to fix plotting functionality