working with example code, and output