Updated example code in the documentation