tweaked to be used in an import