More general way of making the previous change