seperate the functions and examples
some bug fixed
some bug fixed