improvements for search_max_int()