this function should likely not be defined on the fly, as it doesn't close over anything.