best and worst cases