flatten notebook