search functionality and updated scopes