use a loop in the macro