finish first exercise from ch 8