Moving towards python3 compatibility