Explicite encoding function passed along