I might be being naive here, but since this method is called a lot, would it make more sense to have the import outside?