imported code for squisher from CM