fixed import script for systems with low memory