adds control structures for repeating