Added sample code from the portal.