this should be done ahead of time and not in next? I think next should get everything initialized no?