Added Example 4 with first type of code structuring