adapted code examples for 1.3.6