aritmetic, updated foreach software