change meaning of 'true' in mask and add new keyword 'allowFirstLevel'