Create a max function for lists