added case insensitive search
fixed query for extistential search