moved everything to unit32_t to have guarantee on sizes