more refactoring, saveTask