fixed python3 compatiblity