dating algorithm optimization guide