added mask mode interface