okay so it kind of works but wow this is nasty