added query rotate