using a func type instead of the Encoder interface