Law enforcement agencies change tactics to retain officers