updated to reflect tutorial code