add two more flags to control behaviour