Some sample code which might be helpful for other developers.