Support query option

For #8