notebook frontend code