updated tests and error