added functionality for generic mixing