move query generation to V object