rename gen to query