edited to remove output to console