register snapshots
remove obsolete `foreach` keyword

this has been replaced by `for`