update example
refactoring
remove trailing whitespace
udpate example
fix a bug