streamlining the example code