updated to handle search update