edits to write length for block