latest mixing code, slow version