Added has_changed utility function