controller: add handling of optional tasks