add error codes array and method