compatible flexibility against python versions