moved to quantlib/util