wrote queries for tasks, still need to test