rename min and max bestcase and worstcase.