Updated to Support Python 3