adapted to latest wcmf changes