feels like a bit of a hack, but doesn't offend me too deeply. might be worth adding a comment about why it's done at least