similar here can you move this up above allocateResources