added mask where needed