demo code clean up