Modify the code according to the new input