finishes compare function for names and numbers