Course project solution with update to codebook