copy-and-paste code of shadowing-import