fixed doc formatting openBook  function