Made it work with python3