branch loop and Math.X reduction