masks and global variables