updated plotting so it works correctly