apply macro