updated algorithm to get latest event changes to not include processed changes