adding initial support for compaction