properly reverse the coordinates