reduce now works with vars