updates to work with python3