tutorial: refactor tasks