now works with python 2 & 3