get rid of warnings, modify print for python 3.4