add a wrapper for the encoder functions