modified postrm script