refactoring to multi task file