Enhance search function