version 0.04 -- added State changed foreach, sequence