added support for masking interhemispheric and intrahemispheric connections