working implementation of IterValue algorithm
attepts to plot