add list handling to masks