Should move this down to immediately before it is used.