added python3 version (cf3.py)