Rewrote the code.