writing protocol