added py3 cache
added python compatiblity