boundedVar management
loop refactoring
refactoring