Adding apply-mask function.