function change to use console and import