implement masks group rendering