enhanced get_gridpoints method