added addcov2mask() function (DK