loop macro for steps