updated example4 from source