struct_packed refactored