implement search in scope and controller