solved exercises 11 in chapter6