added validation + tests