add support for custom err fund in classRBM