declarative action handling implemented in most basic way. fixes #1