Adding final code