start fragmenting write function