Functional explaining: a new approach to the philosophy of explanation