check task state