Slight modification of mixing function