switch to header and added endian.h