fixes #11 added tests for search