move import inside function