Updated example and added documentation to setValue method