adding optional type declarations for query vars