add custom output function as option