progress on python3 compatibility