sort points from top to bottom