make search actually work correctly