Improvement in the code