Modify the logic of the code