Alex Gruver and Nathan Hall piconot implementation

That's a pretty good idea --- we used "instate" instead of "if", but I think "when" is better.