Add correct type for 'q'