Rewrited cmp name function