Maybe not compile in the function but outside to do it only once.