Fine-tuning the code