Adding functions for compactor.