json passes to functions in main.js