refactored e2e test