update recommentdations.py to support py3