Add error. Convert root into class