test query of tasks