add write protocol