Const pointer for sizes arg.
Validating ID at iteration.