change console.log to return