working on compressing state data