adds test for errors