Now compatible with python 3