Nearly Python3 workable but buggy