implemented error functions within error class