Moved global functions