somehow lost a fuckload of work so yeah ok rewriting this shit