The final code