always use bsearch (sort is currently broken)