sort function for add contact