task encapsulation