add in/out local queries