problems 16 and 18 solved