data and mask can be assembled now as a stack of modules