This took way longer then I want to admit