add encoding sample