second pass at refactoring e2e code