Working on python3 compatibility