change PST to loop