Python 3 compatibility added :)