moved console.log outside of function

moved console.log outside of function