updating logic
Merge pull request #49 from dimagi/tasks-update

updating logic