Adding errors test. Also changing signature