* implemented PRE
* fixed shtudown cleanup