update script and add psweep