implement macro.py, not tested yet