smaller query box, constraint box only when there is a constraint