improved api and more examples