write method proto