adds version number for query validation