allow to throw an exception.
improve error handling
rename test