make into a commonjs style module
add simple example which can run with tryme