add reversal of byte array while writing out the byte array for data
structures