modified the import spekctrum function