fixed console.log to remove newlines