Changed fold_psr to take arguments