added mcf helper code