Finish draft of algorithm design