can we get away from having to do so many instanceof checks in this task runner?