finish lecture 20 note implementation