sync: implemening macro system