modified pa3 script