switched to slow bsearch, but at least it works now.