if len(s) == 0 then this function will panic, as Max does.