reorder according to semantical meaning