added validation plus e2e tests