add hasChanged(attr) method to record