issue #13
issue #13 error function