update lessons 2-4 to new API