removed console.log where necessary