added compression on edit