making the task status querying a little more flexible