optimizes pugs gibbing code