Added loop macro