fixed chap08/ex01: use whole data instead of last pt to calculate dimension