added add_protocol function