Got function exporting to finally work