working version.
completed docs.
added autoRestart switch.