added python 3 compatibility and started actually testing this stuff