more flexibility for specifying query