added compression before simulation