added support for python 3 using pymysql