working on binary search for buttons