added max(max()) to be safe