Create function search