implementing radial_grid_function