added draft of bwIsMask.sh