updated comment
improved test
fixed error messages