serialization helper + use index for bricks