added recursive binary search