cleanup
encoding for model class saving