INKLESS-1393: move subtasks to functions as you can only run a task once