statemachine example with boost