New function in mytype: sort the coordinations