Rewrote that, it was pretty messy