Move import into function