optimization to pstring class