see Is there a way to customize the ADR algorithm for reference, also not a complete guide but has some hints…