reverse array for block writing