porting notebook stuff