move query access declaration sooner