add binary_search and frequency methods