added some code examples
add some test cases
fixed append bug