added tests and validations