adding puppetmaster refactor