edit for pythom >= 3.0