sort vertices