Added encode.py