Changed hasValueChanged to hasChangedValue, added  option and refactorized implementation