final code2