translate rest of tutorial to new 2.x API