make it work with python3