My implementation of ED