added 5D grid class