match update

changed to skip cases with id less than current