refine the console.log throughout