added option for compression