vectors now assigned to grid, fixed memory errors