don't you think `i < numPlatforms` is safer?