Made it python 3 compatible