trying out the examples using the new programming style