update
mid
mid = (top + bottom)/2