New function initialize_grid