Now subgridurl can be a function