Development of the mask method for incompressible unsteady flows