avoid passing around nested coordinate arrays