Import code into new package for threading