okay this looks broke as fuck but I'm not spending any more time on it