Added binary search and frequency