Changed import to be inside of function