fixed imports to work with python 2 or 3