got search function to work faster