first step to compressing