added revert changes method