added hdr reading and writing