work on integrating multi query and single query