why don't we move this function to util