Added function to see which attributes changed between current and previous state