Finalized psh.c