switch from array of arrays to struct for environment