Python 3 support 

I made source compatible with Python 3