made python 2 compatible