declare rel2 inside loop