we should probably put this somewhere else, to factorize it.