added mix function