made search a bit smarter