Define max for th