added e2e-tests and changed factory