add direct encoding