Moved import into function