Improved the example & added doc.