changing to support python3