updated protocol code