implement total_changes method