Task Constructor Function as factory