finish final code