better error code organisation