added API examples in the examples folder