reform query representation mechanism