chap 1: add bouncing ball example