Added task based implementation