altered save_ll2grid to work more generally for loc variable