First working code for both ImageQuery and ImageQuery with Composition