add license, minor modifications to the example
add license, minor modifications to the example