Update of final code