Solutions for 3.17 and 3.18