add encoder factory_interface