doing compress, not done! TODO may use some other data structure