refactored DES

added higher cohesion and matched type signatures. Hasn’t ran yet