Added line to make func global.