Can you move this to a separate function too?