changed return values to true/false and added closest binary search method