add funs to encoder_wrapper