improve notebook behaviour