skeleton, excluding schemes
not sure why I'm committing; this thing's all over the place
some of the logic here might be vaguely correct