please just move this part before the loop