added updated code samples.