update demo item 2 and code clean up