add unit test to errors and alter restricted meth