refine macro applying.