Encode finished, untested