modify sample example, and bug fixed;