Examples what you have provided is not working perfectly..and unable to understand the documentation.