add 'encoded' field in model