Updated example4 from latest source