add set-protocol! function.