adding code snippets from the workshop day 2