update protocol code