working through the examples