deep-traverse for imports