improved binary_search.c code