rewrite example code.
add license to gemspec. #1