rebuilt with console.log