tests and errors