changed the script to print in R console.