implement vertexOrder and sortVertex, rename some functions