init sample app chap 3