update from master
modified some samples.