working on search features. Bugfixes in the process