changed grid_layer to dynamic_layer