add volatile demo source code