added validation & basic testing