added master/slave macros