updated: demo code