Updated search funciton for case insensitivity