refactored switch for mco puppetd usage