some console.logs removed