search function works now