add write functionality to comments