generate_grid appears to be working