update demo
make dispose method safer
add some getter method and modify testcode