Added commented version of code, will export function instead of exporting variable after lunch, better practice in long run