modifications for dealing with multiple cells in a selected region, quick plot, and importing an existing mask