demo code for t. Thinh