update examples
support actions described using data
add action() tests
update for the changed module.exports
fix action() implmentation