Adding code from Puppetforge