updated example snippet