writing processing part