add sample app layout and finish ch 6