more refactoring of e2e