make this compatible with python3