added throw for montecarlo, clarified some var declares in zigzag