Solved exercises 3.11-3.13