Added NB 2 final code