Binary search with recursive function