Update working version for P3, need more test though.