code from pps