Added function and console.log for vars to test.