finalizing notebook