add other encode support