Enhancing the code