Adding final code from presentation.