half way done still writing binary search iterative refinement, changed conclusion per shens comments