added mask function
added mask function