add notebook. fixed bugs.