made orderByName into a function instead of method