add validation and more tests