avoid having mutable state stored inside of the task