add macro sample
fix bug of macro.py