refactoring test submit and res collect