refactoring NetworkTask