dear god, I'm sorry this is so messy and that I didn't just use a database