import changed to be compatible with python 3