optimized the puppet template