added mixing source variables and define switches

added mixing source variables and define switches