more example code and minor fix.