mod2values function added