Global functions.