encapsulate imports in function
encapsulate doc level imports in function