encode status codes