working on calculating compression