moved import into functions