added more validation tests and fixed