Tutorial 2 code examples