fix: max function should evaluate to max