Adding code for contraction without compaction