updated kevin123's compression patch