write put procedure