set query,get samples
minor changes