fixed imports

made python earlier and newer versions compatible