revised version to 1.0.0 some examples may not work