improving the task api