modification to the code