optimising query and roadmap