added isEqual and reset functions