Seeing as it was written by Lewis Cohen, this code probably sucks