Don't you dare ask what I thought when I wrote this code...