Created task pattern class.