implement dynamic mixing