updating for complex search functionality