added a code sample for part 3-b-4/5