functions shouldn't be global.