making this library python 3 compatible