this method will become some more complex to handle cases like changing attribute to previous value