Keeping compatibility with mentioned versions of python