checking goes first before compressing.