changes to ensure python3 compatability