createTask logic reworked