Add hasChanged method