Rewrote most of it