repaired code and began binary search