improve task model and tests