reviewed keys. switched to more native byteorder