aligning task and batch apis