adding error code