add back expandQuery function. If you want to modify this file, please pull