fixed up PS.c