add a flag for pattern enable or disable