a few fixes to search and more todo