moved import statement into function body