remaining chapter10 code