Could you move this function outside?