solved problems 15 - 17 (f#)